

#include <iostream>

class TEST1 {
    public:
        TEST1() { 
            std::cout << "Construct TEST1" << std::endl;
        }
        TEST1(const TEST1& t1) {
            std::cout << "Copy Constructor for TEST1" << std::endl;
        }

        TEST1& operator = (const TEST1& t1) {
            std::cout << "assignment for TEST1" << std::endl;
             return *this;
        }

        int a;
};

class TEST2 {
    public:
        TEST1 test1;

        //origin version
        // TEST2(TEST1 & t1) {
        //     test1 = t1;
        // }

        //update version
        TEST2(TEST1 &t1): test1(t1) {

        }
};

void test_case1() {
    TEST1 t1;
    TEST2 t2(t1);
}

class T2 {
    public:
        T2(int a): i(a) {}
        int i;
};

class T3 {
    public:
        T2 test2;
        
        //cannot pass the build       
        // T3(T2 & t2) {
        //     test2 = t2;
        // }


        T3(T2 & t2): test2(t2) {

        }
};

void test_case2() {


}
int main() {

    //test_case1();
    test_case2();

    return 0;
}